using UnityEngine;
using System.Collections;

[System.Serializable]
public class DieDown : CharacterAction {
	

	// Update is called once per frame
	void DestorySelf()
	{
        //TODO: need get pooled
        Destroy(character.gameObject);
	}

    public float durationTime = 3.0f;
	public override void OnActionEnter(Character character)
	{
        character.rigidbody.constraints = RigidbodyConstraints.FreezePositionX|RigidbodyConstraints.FreezePositionZ;
        CapsuleCollider collider = character.GetComponent<CapsuleCollider>();
        collider.enabled = false;
        Invoke("DestorySelf",durationTime);	
	}

}
